Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@chunhtai
Copy link
Contributor

@chunhtai chunhtai commented Nov 1, 2024

framework flutter/flutter#158023

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Dec 2, 2024
@chunhtai chunhtai marked this pull request as ready for review December 3, 2024 21:32
@chunhtai chunhtai requested a review from yjbanov December 3, 2024 21:35
/// The roles are translated into native accessibility roles in each platform.
enum SemanticsRole {
/// Does not represent any role.
none,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this could use a name that describes what it does rather than what it doesn't do. Perhaps something like container? If a node doesn't have a functional/interactive role, it still pays the role to contain and position its children, if any.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find container to be a confusing name in this case. especially if it is used as an leaf node.

///
/// Uses aria tab role to convey this semantic information to the element.
///
/// Screen-readers takes advantage of "aria-label" to describe the visual.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a guarantee that "aria-label" will be used? label_and_value.dart may use one of three representations for a label. All representations work with screen readers but they have their own nuances.

Maybe here we should talk about SemanticsObject.label instead of aria-label?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied this from other SemanticsRole. I thought this is describing the use of LabelRepresentation.ariaLabel ?

kTab = 1,
kTabBar = 2,
kTabPanel = 3,
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume a C version of this change will also need to be added embedder.h?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do that in a separate pr when i add the support to the desktop embedding. I am trying to avoid adding support for all platforms in a single pr

@chunhtai chunhtai closed this Jan 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

platform-ios platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants